# -*- coding: utf-8 -*-
MyDesktop.${componentId} = Ext.extend(Ext.app.Module, {
    id:'${componentId}',
    init : function(){
    	${launcher.display(value_for(launcher), **args_for(launcher)) } 
    },

    createWindow : function(){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('${window.name}');
        
        %for k, v in declarations.iteritems():
        var ${k} = ${v.display(value_for(v), **args_for(v)) };
        %endfor
        
        if(!win){
            win = desktop.createWindow(
            	${window.display(value_for(window), **args_for(window)) }
            ) 
        }
        win.show();
    }
});